#!/bin/bash
the_ip=$(curl -s https://api.ipify.org)
if [ -e "ip.txt" ]
then
  old_ip=$(cat ip.txt)
  if [ "$the_ip" == "$old_ip" ]
  then
    echo "Your IP $the_ip didn't change."
  else
    echo "$the_ip" > ip.txt
    echo "The IP Changed from $old_ip to $the_ip"
    change_dot_com=$(curl -s "http://update.dnsexit.com/RemoteUpdate.sv?login=YourDNSExitLogin&password=YourDNSExitPassword&host=chatscribble.com")
    echo "$change_dot_com"
    sleep 5
    change_dot_com=$(curl -s "http://update.dnsexit.com/RemoteUpdate.sv?login=YourDNSExitLogin&password=YourDNSExitPassword&host=russellhankins.com")
    echo "$change_dot_com"
    sleep 5
    change_dot_com=$(curl -s "http://update.dnsexit.com/RemoteUpdate.sv?login=YourDNSExitLogin&password=YourDNSExitPassword&host=vanessasgarage.com")
    echo "$change_dot_com"
    sleep 5
    change_dot_com=$(curl -s "http://update.dnsexit.com/RemoteUpdate.sv?login=YourDNSExitLogin&password=YourDNSExitPassword&host=pizzaorsalad.com")
    echo "$change_dot_com"
    sleep 5
    change_dot_com=$(curl -s "http://update.dnsexit.com/RemoteUpdate.sv?login=YourDNSExitLogin&password=YourDNSExitPassword&host=partnotes.com")
    echo "$change_dot_com"
    sleep 5
    change_dot_com=$(curl -s "http://update.dnsexit.com/RemoteUpdate.sv?login=YourDNSExitLogin&password=YourDNSExitPassword&host=base85.com")
    echo "$change_dot_com"
    sleep 5
    change_dot_com=$(curl -s "http://update.dnsexit.com/RemoteUpdate.sv?login=YourDNSExitLogin&password=YourDNSExitPassword&host=serviciospatys.com")
    echo "$change_dot_com"
    sleep 5
    change_dot_com=$(curl -s "http://update.dnsexit.com/RemoteUpdate.sv?login=YourDNSExitLogin&password=YourDNSExitPassword&host=mondobeach.catering")
    echo "$change_dot_com"
  fi
else
  echo "$the_ip" > ip.txt
  echo "Your IP is $the_ip"
fi
